﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using AdminManager.Utility;

namespace AdminManager.Data
{
    public class Article
    {
        public static DataTable ListByType(int rowcount,string tType)
        {
            string sql = "select top " + rowcount + " tid,ttile,ttime from Topic where tType='" + tType + "'";
            return AccessHelper.GetDataTable(sql);
        }

        public static DataTable ListBySort(int rowcount,string cols, string tType)
        {
            string sql = "select top " + rowcount + " " + cols + " from Topic";
            return AccessHelper.GetDataTable(sql);
        }
    }
}
